home *** CD-ROM | disk | FTP | other *** search
/ InfoMagic Internet Tools 1993 July / Internet Tools.iso / RockRidge / mail / metamail / contrib / mms / lib / str_stdio.h < prev    next >
Encoding:
C/C++ Source or Header  |  1992-06-04  |  1.6 KB  |  44 lines

  1. /*////////////////////////////////////////////////////////////////////////
  2. Copyright (c) 1992 Electrotechnical Laboratry (ETL)
  3.  
  4. Permission to use, copy, modify, and distribute this material
  5. for any purpose and without fee is hereby granted, provided
  6. that the above copyright notice and this permission notice
  7. appear in all copies, and that the name of ETL not be
  8. used in advertising or publicity pertaining to this
  9. material without the specific, prior written permission
  10. of an authorized representative of ETL.
  11. ETL MAKES NO REPRESENTATIONS ABOUT THE ACCURACY OR SUITABILITY
  12. OF THIS MATERIAL FOR ANY PURPOSE.  IT IS PROVIDED "AS IS",
  13. WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES.
  14. /////////////////////////////////////////////////////////////////////////
  15. Content-Type: program/C; charset=US-ASCII
  16. Program:      str_stdio.h
  17. Author:       Yutaka Sato <ysato@etl.go.jp>
  18. Description:
  19.  
  20.      This program redirects the file I/O from/to strings on memory.
  21.      Include "str_stdio.h" instead of <stdio.h>
  22.  
  23. History:
  24.     92.05.18   created
  25. ///////////////////////////////////////////////////////////////////////*/
  26.  
  27. #include <stdio.h>
  28. #undef getc
  29. #undef putc
  30.  
  31. #define getc(file)        str_getc(file)
  32. #define fgetc(file)        str_getc(file)
  33. #define ungetc(ch,file)        str_ungetc(ch,file)
  34. #define fgets(buf,size,file)    str_fgets(buf,size,file)
  35. #define putc(ch,file)        str_putc(ch,file)
  36. #define fputc(ch,file)        str_putc(ch,file)
  37. #define fputs(buf,file)        str_fputs(buf,file)
  38. #define fflush(file)        str_fflush(file)
  39. #define fseek(file,off,where)    str_fseek(file,off,where)
  40. #define ftell(file)        str_ftell(file)
  41. #define fclose(file)        str_fclose(file)
  42.  
  43. #define fprintf            str_fprintf
  44.